<?php if (!defined('THINK_PATH')) exit(); /*a:1:{s:33:"./template/admin/index\index.html";i:1638706926;}*/ ?>


<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title><?php echo (isset($systems['title']) && ($systems['title'] !== '')?$systems['title']:"xwhcms"); ?></title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  <link rel="stylesheet" href="/static/layadmin/layui/css/layui.css" media="all">
  <link rel="stylesheet" href="/static/layadmin/style/admin.css" media="all">
  <link rel="stylesheet" href="/static/plugins/font-awesome-4.7.0/css/font-awesome.css" media="all">
  
  <script>
  /^http(s*):\/\//.test(location.href) || alert('请先部署到 localhost 下再访问');
  </script>
</head>
<body class="layui-layout-body">
  
  <div id="LAY_app">
    <div class="layui-layout layui-layout-admin">
      <div class="layui-header">
        <!-- 头部区域 -->
        <ul class="layui-nav layui-layout-left" style="padding: 0 10px 0 0;">
          <li class="layui-nav-item layadmin-flexible" lay-unselect>
            <a href="javascript:;" layadmin-event="flexible" title="侧边伸缩" style="padding: 0 10px;">
              <i class="layui-icon layui-icon-shrink-right" id="LAY_app_flexible"></i>
            </a>
          </li>
          <!--<li class="layui-nav-item layui-hide-xs" lay-unselect>-->
          <!--  <a href="index1.html" title="系统">-->
          <!--    <i class="layui-icon layui-icon-set"></i> 系统-->
          <!--  </a>-->
          <!--</li>-->
          <!--<li class="layui-nav-item layui-hide-xs" lay-unselect>-->
          <!--  <a href="index2.html" title="开发">-->
          <!--    <i class="layui-icon layui-icon-component"></i> 开发-->
          <!--  </a>-->
          <!--</li>-->
          <!--<li class="layui-nav-item layui-hide-xs layui-this" lay-unselect>-->
          <!--  <a href="index.html" target="_blank" title="内容">-->
          <!--    <i class="layui-icon layui-icon-read"></i> 门户-->
          <!--  </a>-->
          <!--</li>-->
          <!--<li class="layui-nav-item layui-hide-xs" lay-unselect>-->
          <!--  <a href="http://www.layui.com/admin/" target="_blank" title="产品">-->
          <!--    <i class="layui-icon layui-icon-cart"></i> 产品-->
          <!--  </a>-->
          <!--</li>-->
          <!--<li class="layui-nav-item layui-hide-xs" lay-unselect>-->
          <!--  <a href="http://www.layui.com/admin/" target="_blank" title="用户">-->
          <!--    <i class="layui-icon layui-icon-user"></i> 会员-->
          <!--  </a>-->
          <!--</li>-->
          
      <!--    <li class="layui-nav-item layui-hide-xs" lay-unselect>
            <input type="text" placeholder="搜索..." autocomplete="off" class="layui-input layui-input-search" layadmin-event="serach" lay-action="template/search.html?keywords="> 
          </li> -->
        </ul>
        <ul class="layui-nav layui-layout-right" lay-filter="layadmin-layout-right">
          <li class="layui-nav-item layui-hide-xs" lay-unselect>
            <a href="javascript:;" layadmin-event="fullscreen" title="全屏">
              <i class="layui-icon layui-icon-screen-full"></i>
            </a>
          </li>
          <li class="layui-nav-item layui-hide-xs" lay-unselect>
            <a href="/" target="_blank" title="前台">
              <i class="layui-icon layui-icon-release"></i>
            </a>
          </li>
<!--           <li class="layui-nav-item" lay-unselect>
            <a href="javascript:;" layadmin-event="refresh" title="清除缓存">
              <i class="layui-icon layui-icon-fonts-clear"></i>
            </a>
          </li> -->
          <li class="layui-nav-item" lay-unselect>
            <a href="javascript:;">
              <cite><?php echo $userMsg['username']; ?></cite>
            </a>
            <dl class="layui-nav-child">
              <dd><a lay-href="/admin/systemt/setMsg.html">修改资料</a></dd>
              <!-- <dd><a lay-href="set/user/password.html">修改密码</a></dd> -->
              <!-- <hr> -->
              <dd id="logout" style="text-align: center;"><a>退出</a></dd>
            </dl>
          </li>
          <li class="layui-nav-item layui-hide-xs" lay-unselect>
            <a href="javascript:;" layadmin-event="theme" title="配色">
              <i class="layui-icon layui-icon-more-vertical"></i>
            </a>
          </li>
 <!--          <li class="layui-nav-item layui-hide-xs" lay-unselect>
            <a href="javascript:;" layadmin-event="about"><i class="layui-icon layui-icon-more-vertical"></i></a>
          </li>
          <li class="layui-nav-item layui-show-xs-inline-block layui-hide-sm" lay-unselect>
            <a href="javascript:;" layadmin-event="more"><i class="layui-icon layui-icon-more-vertical"></i></a>
          </li> -->
        </ul>
      </div>
      
      <!-- 侧边菜单 -->
      <div class="layui-side layui-side-menu">
        <div class="layui-side-scroll">
          <div class="layui-logo">
            <span><?php echo (isset($systems['sitename']) && ($systems['sitename'] !== '')?$systems['sitename']:"WH"); ?>CMS</span>
          </div>
          
          <ul class="layui-nav layui-nav-tree" lay-shrink="all" id="LAY-system-side-menu" lay-filter="layadmin-system-side-menu">
<!--             <li data-name="app" class="layui-nav-item">
              <a href="javascript:;" lay-tips="应用" lay-direction="2">
                <i class="layui-icon layui-icon-app"></i>
                <cite>关于我们</cite>
              </a>
              <dl class="layui-nav-child">
                <dd><a lay-href="admin/about/index.html">文章列表</a></dd>
                <dd><a lay-href="admin/about/category.html">文章分类</a></dd>    
              </dl>
            </li>
            <li data-name="app" class="layui-nav-item">
              <a href="javascript:;" lay-tips="应用" lay-direction="2">
                <i class="layui-icon layui-icon-app"></i>
                <cite>新闻管理</cite>
              </a>
              <dl class="layui-nav-child">
                <dd><a lay-href="admin/news/index.html">新闻列表</a></dd>
                <dd><a lay-href="admin/news/category.html">新闻分类</a></dd>    
              </dl>
            </li>
            <li data-name="app" class="layui-nav-item">
              <a href="javascript:;" lay-tips="应用" lay-direction="2">
                <i class="layui-icon layui-icon-app"></i>
                <cite>产品管理</cite>
              </a>
              <dl class="layui-nav-child">
                <dd><a lay-href="admin/product/index.html">产品列表</a></dd>
                <dd><a lay-href="admin/product/category.html">产品分类</a></dd>    
               
              </dl>
            </li>
            <li data-name="app" class="layui-nav-item">
              <a href="javascript:;" lay-tips="应用" lay-direction="2">
                <i class="layui-icon layui-icon-app"></i>
                <cite>招商定制</cite>
              </a>
              <dl class="layui-nav-child">
                <dd><a lay-href="admin/business/index.html">招商政策</a></dd>
                <dd><a lay-href="admin/business/category.html">政策分类</a></dd>    
              </dl>
            </li> -->
            <?php if(is_array($channel) || $channel instanceof \think\Collection || $channel instanceof \think\Paginator): $i = 0; $__LIST__ = $channel;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;?>
            
            <li data-name="develop" class="layui-nav-item">
              <?php if(count($v['child']) > 0): ?>
              <a href="javascript:;" lay-tips="<?php echo $v['name']; ?>" lay-direction="2">
                <i class="layui-icon layui-icon-template"></i>
                <cite><?php echo $v['name']; ?></cite>
              </a>
              <dl class="layui-nav-child">
                <?php if(is_array($v['child']) || $v['child'] instanceof \think\Collection || $v['child'] instanceof \think\Paginator): $i = 0; $__LIST__ = $v['child'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$y): $mod = ($i % 2 );++$i;if(count($y['child']) > 0): ?>
                <dd data-name="form" class="">
                  <a href="javascript:;"><?php echo $y['name']; ?><span class="layui-nav-more"></span></a>
                  <dl class="layui-nav-child">
                    <?php if(is_array($y['child']) || $y['child'] instanceof \think\Collection || $y['child'] instanceof \think\Paginator): $i = 0; $__LIST__ = $y['child'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$z): $mod = ($i % 2 );++$i;?>
                    <dd><a lay-href="admin/<?php echo $z['contro']; ?>/index/fid/<?php echo $z['id']; ?>.html"><?php echo $z['name']; ?></a></dd>
                    <?php endforeach; endif; else: echo "" ;endif; ?>
                  </dl>
                </dd>
                <?php else: ?>
                <dd><a lay-href="admin/<?php echo $y['contro']; ?>/index/fid/<?php echo $y['id']; ?>.html"><?php echo $y['name']; ?></a></dd>
                <?php endif; endforeach; endif; else: echo "" ;endif; ?>
                <!-- <dd><a lay-href="admin/develop/modelx.html">模型管理</a></dd> -->
              </dl>
              <?php else: if($v['type'] != 3): ?>
                <a href="javascript:;"  lay-href="admin/<?php echo $v['contro']; ?>/index/fid/<?php echo $v['id']; ?>.html" lay-tips="<?php echo $v['name']; ?>" lay-direction="2">
                  <i class="layui-icon layui-icon-auz"></i>
                  <cite><?php echo $v['name']; ?></cite>
                </a>
                <?php endif; endif; ?>
            </li>     
            <?php endforeach; endif; else: echo "" ;endif; ?>
<!--             <li data-name="app" class="layui-nav-item">
              <a href="javascript:;" lay-tips="应用" lay-direction="2">
                <i class="layui-icon layui-icon-app"></i>
                <cite>附件管理</cite>
              </a>
              <dl class="layui-nav-child">
                <dd><a lay-href="admin/filex/index.html">附件列表</a></dd>
                <dd><a lay-href="admin/filex/category.html">附件分组</a></dd>    
              </dl>
            </li> -->
            
            <li data-name="app" class="layui-nav-item">
              <a href="javascript:;" lay-tips="应用" lay-direction="2">
                <i class="layui-icon layui-icon-app"></i>
                <cite>功能组件</cite>
              </a>
              <dl class="layui-nav-child">
                <dd class=" "><a lay-href="addons/index/index.html">组件列表</a></dd>
                <?php if(is_array($plugin) || $plugin instanceof \think\Collection || $plugin instanceof \think\Paginator): $i = 0; $__LIST__ = $plugin;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;?>
                <dd class=" "><a lay-href="addons/<?php echo $v['mark']; ?>/index.html"><i class="fa <?php echo $v['icon']; ?>" aria-hidden="true"></i> <?php echo $v['name']; ?></a></dd>               
                <?php endforeach; endif; else: echo "" ;endif; ?>
              </dl>
            </li>
<!--             <li data-name="home" class="layui-nav-item layui-this">
              <a href="javascript:;" lay-href="layuiadmin/index/home.html" lay-tips="系统配置" lay-direction="2">
                <i class="layui-icon layui-icon-auz"></i>
                <cite>系统配置</cite>
              </a>
            </li> -->
            <li data-name="systemt" class="layui-nav-item">
              <a href="javascript:;" lay-tips="页面" lay-direction="2">
                <i class="layui-icon layui-icon-template"></i>
                <cite>系统管理</cite>
              </a>
              <dl class="layui-nav-child">
                <dd><a lay-href="admin/systemt/index.html">站点设置</a></dd>                
                <dd><a lay-href="admin/systemt/channel.html">菜单导航</a></dd>                
                <dd><a lay-href="admin/systemt/admint.html">管理员设置</a></dd>                
                <dd><a lay-href="admin/systemt/modelx.html">模型管理</a></dd>                
                <dd><a lay-href="admin/systemt/template.html">模板管理</a></dd>                
              <!--   <dd><a lay-href="">数据备份</a></dd>
                <dd><a lay-href="">操作日志</a></dd> -->
                <!-- <dd><a lay-href="template/search.html">应用配置</a></dd> -->
              </dl>
            </li>
            
<!--             <li data-name="template" class="layui-nav-item">
              <a href="javascript:;" lay-tips="页面" lay-direction="2">
                <i class="layui-icon layui-icon-template"></i>
                <cite>产品管理</cite>
              </a>
              <dl class="layui-nav-child">
                <dd><a lay-href="template/personalpage.html">个人主页</a></dd>
                <dd><a lay-href="template/addresslist.html">通讯录</a></dd>
                <dd class=" "><a lay-href="template/caller.html">客户列表</a></dd>
                <dd><a lay-href="template/goodslist.html">商品列表</a></dd>
                <dd><a lay-href="template/search.html">搜索结果</a></dd>
              </dl>
            </li> -->
<!--             <li data-name="template" class="layui-nav-item">
              <a href="javascript:;" lay-tips="页面" lay-direction="2">
                <i class="layui-icon layui-icon-template"></i>
                <cite>会员管理</cite>
              </a>
              <dl class="layui-nav-child">
                <dd><a lay-href="template/personalpage.html">个人主页</a></dd>
                <dd><a lay-href="template/addresslist.html">通讯录</a></dd>
                <dd class=" "><a lay-href="template/caller.html">客户列表</a></dd>
                <dd><a lay-href="template/goodslist.html">商品列表</a></dd>
                <dd><a lay-href="template/search.html">搜索结果</a></dd>
              </dl>
            </li>
            <li data-name="template" class="layui-nav-item">
              <a href="javascript:;" lay-tips="页面" lay-direction="2">
                <i class="layui-icon layui-icon-template"></i>
                <cite>订单管理</cite>
              </a>
              <dl class="layui-nav-child">
                <dd><a lay-href="template/personalpage.html">个人主页</a></dd>
                <dd><a lay-href="template/addresslist.html">通讯录</a></dd>
                <dd class=" "><a lay-href="template/caller.html">客户列表</a></dd>
                <dd><a lay-href="template/goodslist.html">商品列表</a></dd>
                <dd><a lay-href="template/search.html">搜索结果</a></dd>
              </dl>
            </li> -->
    <!--         <li data-name="template" class="layui-nav-item">
              <a href="javascript:;" lay-tips="页面" lay-direction="2">
                <i class="layui-icon layui-icon-template"></i>
                <cite>权限管理</cite>
              </a>
              <dl class="layui-nav-child">
                <dd><a lay-href="template/personalpage.html">管理员</a></dd>
                <dd><a lay-href="template/addresslist.html">角色分组</a></dd>
              </dl>
            </li> -->
          </ul>
        </div>
      </div>

      <!-- 页面标签 -->
      <div class="layadmin-pagetabs" id="LAY_app_tabs">
        <div class="layui-icon layadmin-tabs-control layui-icon-prev" layadmin-event="leftPage"></div>
        <div class="layui-icon layadmin-tabs-control layui-icon-next" layadmin-event="rightPage"></div>
        <div class="layui-icon layadmin-tabs-control layui-icon-down">
          <ul class="layui-nav layadmin-tabs-select" lay-filter="layadmin-pagetabs-nav">
            <li class="layui-nav-item" lay-unselect>
              <a href="javascript:;"></a>
              <dl class="layui-nav-child layui-anim-fadein">
                <dd layadmin-event="closeThisTabs"><a href="javascript:;">关闭当前标签页</a></dd>
                <dd layadmin-event="closeOtherTabs"><a href="javascript:;">关闭其它标签页</a></dd>
                <dd layadmin-event="closeAllTabs"><a href="javascript:;">关闭全部标签页</a></dd>
              </dl>
            </li>
          </ul>
        </div>
        <div class="layui-tab" lay-unauto lay-allowClose="true" lay-filter="layadmin-layout-tabs">
          <ul class="layui-tab-title" id="LAY_app_tabsheader">
            <li lay-id="admin/index/layouts.html" lay-attr="admin/index/layouts.html" class="layui-this"><!-- <i class="layui-icon layui-icon-home"></i> -->控制台</li>
          </ul>
        </div>
      </div>
      
      
      <!-- 主体内容 -->
      <div class="layui-body" id="LAY_app_body">
        <div class="layadmin-tabsbody-item layui-show">
          <iframe src="admin/index/layouts.html" frameborder="0" class="layadmin-iframe"></iframe>
        </div>
      </div>
      
      <!-- 辅助元素，一般用于移动设备下遮罩 -->
      <div class="layadmin-body-shade" layadmin-event="shade"></div>
    </div>
  </div>

  <script src="/static/layadmin/layui/layui.js"></script>
 <script>
  layui.config({
    base: '/static/layadmin/' //静态资源所在路径
  }).extend({
    index: 'lib/index' //主入口模块
  }).use(['index', 'user','form'], function(){
    var $ = layui.$
    // ,setter = layui.setter
    // ,admin = layui.admin
    ,form = layui.form;
    // ,router = layui.router()
    // ,search = router.search;

    // form.render();
    $('#logout').on('click', function () {
      // 搜索条件
      $.get('<?php echo url("admin/login/outlogin"); ?>',{},function(ret){
            ret = $.parseJSON(ret);
            if (ret.code == 0) { //添加失败
                layer.msg(ret.msg, { icon: 5 })
            } else { //添加成功
                layer.msg(ret.msg, { icon: 6 }, function() {
                  window.location.href="/admin/login/index";
                    // $(obj).parents("tr").remove();
                    obj.del();
                })
            }
        }); 
    });




    //提交
    form.on('submit(LAY-user-login-submit)', function(obj){
      var field = obj.field; //获取提交的字段
      var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引  
      // layer.msg('表单已提交');
      // console.log(field);
      //提交 Ajax 成功后，关闭当前弹层并重载表格
      $.post('/admin/login/dologin', { username: field.username, password: field.password, vercode: field.vercode}, function(res) {
          res = $.parseJSON(res);
          console.log(res);
          if (res.code == 200) {
              layer.msg(res.msg, {
                  icon: 1,
                  time: 2000 //2秒关闭（如果不配置，默认是3秒）
              }, function() {    
                 location.href = '/admin'; //后台主页
              });
          } else {
              layer.msg(res.msg, { icon: 2, time: 2000 });
          }
      });
    });

    //更换图形验证码
    $('body').on('click', '#change-vercode', function(){
      var othis = $(this);
      this.src = '<?php echo captcha_src(); ?>?t='+ new Date().getTime()
    });
    
    //实际使用时记得删除该代码
    // layer.msg('为了方便演示，用户名密码可随意输入', {
    //   offset: '15px'
    //   ,icon: 1
    // });
    
  });
  </script>
  
  <!-- 百度统计 -->
  <script>
  var _hmt = _hmt || [];
  (function() {
    var hm = document.createElement("script");
    hm.src = "https://hm.baidu.com/hm.js?d214947968792b839fd669a4decaaffc";
    var s = document.getElementsByTagName("script")[0]; 
    s.parentNode.insertBefore(hm, s);
  })();
  </script>
</body>
</html>


